//数学常量
//自然常数
console.log(Math.E);//2.718281828459045
//2的自然对数
console.log(Math.LN2);//0.6931471805599453
//10的自然对数
console.log(Math.LN10);//2.302585092994046
//以2为底E的对数
console.log(Math.LOG2E);//1.4426950408889634
//以10为底E的对数
console.log(Math.LOG10E);//0.4342944819032518
//圆周率
console.log(Math.PI);//3.141592653589793
//1/2的平方根
console.log(Math.SQRT1_2);//0.7071067811865476
//2的平方根
console.log(Math.SQRT2);//1.4142135623730951

//数学方法
//求绝对值
console.log(Math.abs(-4));//4
//求反余弦值
console.log(Math.acos(0.5));//1.0471975511965976
//求反正弦值
console.log(Math.asin(0.5));//0.5235987755982988
//求反正切值
console.log(Math.atan(0.5));//0.46364760900080615
//需要传入两个参数x，y，求y/x的反正切值
console.log(Math.atan2(1,2));//0.4636476090008061
//进行向上取整
console.log(Math.ceil(1.1));//2
//求余弦值
console.log(Math.cos(0.5));//0.8775825618903728
//传入参数n 求自然对数E的n次方
console.log(Math.exp(2));//7.3890560989306495
//向下取整
console.log(Math.floor(2.9));//2
//传入参数n 求以自然常数E为底n的对数
console.log(Math.log(10));//2.302585092994046
//求一组数中的最大值
console.log(Math.max(1,2,5,3,7));//7
//求一组数中的最小值
console.log(Math.min(1,2,5,3,7));//1
//传入两个参数x，y 求x的y次方
console.log(Math.pow(2,3));//8
//返回一个0-1之间的随机数
console.log(Math.random());
//进行四舍五入
console.log(Math.round(3.4));//3
//求正弦值
console.log(Math.sin(0.5));
//求平方根
console.log(Math.sqrt(2));//1.4142135623730951
//求正切值
console.log(Math.tan(1));
